﻿<%@ Page Language="C#" MasterPageFile="~/master/CenterMain.Master" AutoEventWireup="true"
    CodeBehind="ApplyInvoice.aspx.cs" Inherits="com.huigo.B2B.Web.center.invoice.ApplyInvoice" %>

<%@ Register Assembly="AspnetPagerV1" Namespace="AspnetPagerV1" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script type="text/javascript">
        function GetAddress() {
            var value = $("#shipping").val();
            if (value == "3") {
                $(".address1").css("display", "none");
                $("#payAmount").css("display", "none");
                $("#address2").css("display", "");
            }
            else {
                $("#product").css("display", "");
                $(".address1").css("display", "");
                $("#payAmount").css("display", "");
                $("#address2").css("display", "none");
            }
            if (value == "2" || value == "3") {
                $("#money").html("0");
            }
            else {
                var value = $("#province").val();
                arr = value.split("|");
                if (arr.length > 1) {
                    $("#money").html(arr[1]);
                }
            }
        }
    </script>

    <h3 class="greybg">
        发票申领</h3>
    <form id="form1" runat="server">
    <table>
        <tbody id="product">
            <tr>
                <td>
                    <label>
                        保险产品</label>
                </td>
                <td>
                    <select id="policy" name="policy" style="width: 200px;">
                        <%=PolicyName() %>
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        申领张数</label>
                </td>
                <td>
                    <input type="text" id="count" name="count" onkeyup="value=value.replace(/[^0-9]/g,'')" />
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        配送方式</label>
                </td>
                <td>
                    <select id="shipping" name="shipping" style="width: 100px;" onchange="GetAddress();">
                        <%=Shipping() %>
                    </select>
                </td>
            </tr>
            <tr class="address1">
                <td>
                    <label>
                        省份</label>
                </td>
                <td>
                    <select id="province" name="province" style="width: 100px;" onchange="GetCity();">
                        <%=Province() %>
                    </select>&nbsp;&nbsp;城市/区&nbsp;&nbsp;<select id="city" name="city" style="width: 100px;"></select>
                </td>
            </tr>
            <tr class="address1">
                <td>
                    <label>
                        地址</label>
                </td>
                <td>
                    <input type="text" id="address" name="address" style="width: 300px;" />
                </td>
            </tr>
            <tr class="address1">
                <td>
                    <label>
                        联系人</label>
                </td>
                <td>
                    <input type="text" id="contacts" name="contacts" />
                </td>
            </tr>
            <tr class="address1">
                <td>
                    <label>
                        联系电话</label>
                </td>
                <td>
                    <input type="text" id="contactsTel" name="contactsTel" />
                </td>
            </tr>
        </tbody>
    </table>
    <div id="payAmount">
        <span>支付金额</span>&nbsp;&nbsp;&nbsp;￥<span id="money">0</span>
    </div>
    <div id="address2" style="display: none;">
        <span>发票自取地址：上海市 XX 区 XXXX路 XX 大厦 XX楼 XXX室</span>
    </div>
    <div style="text-align: center;">
        <input type="button" class="button btn-big btn-orange" value="提交申领" onclick="addInvoiceOrder();" /></div>
    </form>
</asp:Content>
